<template>
  <div class="lyric" v-html="lyric" aria-label="歌词文本" tabindex="0" role="lyric"></div>
</template>

<script>
export default {
  name: "Lyric",
  props: {
    lyric: {
      type: String,
      required: true,
    },
  },
  watch: {
    lyric: function (ov) {
      this.lyric = ov === "" ? "暂无歌词" : ov.replace("\n", "<br>");
    },
  },
};
</script>

<style scoped>
.lyric {
  height: 230px;
  text-align: center;
  color: #bdbdbd;
  font-size: 12px;
  overflow: auto;
  line-height: 25px;
}
</style>
